-- @author lixiyong01
-- @date 2024.07.09
-- movielens_links表

CREATE EXTERNAL TABLE `hdp_lbg_supin_zplisting.raw_hism_movielens_links`(
  `content` string COMMENT '数据内容'
) COMMENT 'movielens对应links原始日志'
PARTITIONED BY (`dt` string COMMENT '日期分区')
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\u0001'
LOCATION 'hdfs://node101:9090/home/hdp_idea/rawdata/hism/movielens/raw_hism_movielens_links'


alter table hdp_lbg_supin_zplisting.raw_hism_movielens_links
add if not exists partition (dt='20240629')
location 'hdfs://node101:9090/home/hdp_idea/rawdata/hism/movielens/raw_hism_movielens_links/20240629';


select content from hdp_lbg_supin_zplisting.raw_hism_movielens_links where dt=20240629 limit 10;



